Priority File Manager
📁 public_html
Base Directory:
/home/ecedu/public_html
/home/ecedu/public_html/wp-content/plugins
/home/ecedu/public_html/wp-content
/home/ecedu
/var/www
/var/www/cgi-bin
/var/www/html
public_html
/
wp-includes
/
blocks
/home/ecedu/public_html/wp-includes/blocks
Name
Type
Size
Actions
📁
..
Folder
-
Delete
Rename
📁
archives
Folder
-
Delete
Rename
📄
archives.php
File
2994
Delete
Rename
Edit
Download
📁
audio
Folder
-
Delete
Rename
📁
avatar
Folder
-
Delete
Rename
📄
avatar.php
File
5745
Delete
Rename
Edit
Download
📁
block
Folder
-
Delete
Rename
📄
block.php
File
3314
Delete
Rename
Edit
Download
📄
blocks-json.php
File
193945
Delete
Rename
Edit
Download
📁
button
Folder
-
Delete
Rename
📄
button.php
File
1805
Delete
Rename
Edit
Download
📁
buttons
Folder
-
Delete
Rename
📁
calendar
Folder
-
Delete
Rename
📄
calendar.php
File
6075
Delete
Rename
Edit
Download
📁
categories
Folder
-
Delete
Rename
📄
categories.php
File
4010
Delete
Rename
Edit
Download
📁
code
Folder
-
Delete
Rename
📁
column
Folder
-
Delete
Rename
📁
columns
Folder
-
Delete
Rename
📁
comment-author-name
Folder
-
Delete
Rename
📄
comment-author-name.php
File
2133
Delete
Rename
Edit
Download
📁
comment-content
Folder
-
Delete
Rename
📄
comment-content.php
File
2459
Delete
Rename
Edit
Download
📁
comment-date
Folder
-
Delete
Rename
📄
comment-date.php
File
1863
Delete
Rename
Edit
Download
📁
comment-edit-link
Folder
-
Delete
Rename
📄
comment-edit-link.php
File
1713
Delete
Rename
Edit
Download
📁
comment-reply-link
Folder
-
Delete
Rename
📄
comment-reply-link.php
File
2075
Delete
Rename
Edit
Download
📁
comment-template
Folder
-
Delete
Rename
📄
comment-template.php
File
4494
Delete
Rename
Edit
Download
📁
comments
Folder
-
Delete
Rename
📁
comments-pagination
Folder
-
Delete
Rename
📁
comments-pagination-next
Folder
-
Delete
Rename
📄
comments-pagination-next.php
File
1924
Delete
Rename
Edit
Download
📁
comments-pagination-numbers
Folder
-
Delete
Rename
📄
comments-pagination-numbers.php
File
1632
Delete
Rename
Edit
Download
📁
comments-pagination-previous
Folder
-
Delete
Rename
📄
comments-pagination-previous.php
File
1790
Delete
Rename
Edit
Download
📄
comments-pagination.php
File
1199
Delete
Rename
Edit
Download
📁
comments-title
Folder
-
Delete
Rename
📄
comments-title.php
File
2772
Delete
Rename
Edit
Download
📄
comments.php
File
6767
Delete
Rename
Edit
Download
📁
cover
Folder
-
Delete
Rename
📄
cover.php
File
3175
Delete
Rename
Edit
Download
📁
details
Folder
-
Delete
Rename
📁
embed
Folder
-
Delete
Rename
📁
file
Folder
-
Delete
Rename
📄
file.php
File
1793
Delete
Rename
Edit
Download
📁
footnotes
Folder
-
Delete
Rename
📄
footnotes.php
File
3771
Delete
Rename
Edit
Download
📁
freeform
Folder
-
Delete
Rename
📁
gallery
Folder
-
Delete
Rename
📄
gallery.php
File
6438
Delete
Rename
Edit
Download
📁
group
Folder
-
Delete
Rename
📁
heading
Folder
-
Delete
Rename
📄
heading.php
File
1301
Delete
Rename
Edit
Download
📁
home-link
Folder
-
Delete
Rename
📄
home-link.php
File
5438
Delete
Rename
Edit
Download
📁
html
Folder
-
Delete
Rename
📁
image
Folder
-
Delete
Rename
📄
image.php
File
12023
Delete
Rename
Edit
Download
📄
index.php
File
5111
Delete
Rename
Edit
Download
📁
latest-comments
Folder
-
Delete
Rename
📄
latest-comments.php
File
5040
Delete
Rename
Edit
Download
📁
latest-posts
Folder
-
Delete
Rename
📄
latest-posts.php
File
8542
Delete
Rename
Edit
Download
📁
legacy-widget
Folder
-
Delete
Rename
📄
legacy-widget.php
File
3997
Delete
Rename
Edit
Download
📁
list
Folder
-
Delete
Rename
📁
list-item
Folder
-
Delete
Rename
📄
list.php
File
1273
Delete
Rename
Edit
Download
📁
loginout
Folder
-
Delete
Rename
📄
loginout.php
File
1418
Delete
Rename
Edit
Download
📁
media-text
Folder
-
Delete
Rename
📄
media-text.php
File
4383
Delete
Rename
Edit
Download
📁
missing
Folder
-
Delete
Rename
📁
more
Folder
-
Delete
Rename
📁
navigation
Folder
-
Delete
Rename
📁
navigation-link
Folder
-
Delete
Rename
📄
navigation-link.php
File
13913
Delete
Rename
Edit
Download
📁
navigation-submenu
Folder
-
Delete
Rename
📄
navigation-submenu.php
File
9943
Delete
Rename
Edit
Download
📄
navigation.php
File
49620
Delete
Rename
Edit
Download
📁
nextpage
Folder
-
Delete
Rename
📁
page-list
Folder
-
Delete
Rename
📁
page-list-item
Folder
-
Delete
Rename
📄
page-list-item.php
File
361
Delete
Rename
Edit
Download
📄
page-list.php
File
13611
Delete
Rename
Edit
Download
📁
paragraph
Folder
-
Delete
Rename
📁
pattern
Folder
-
Delete
Rename
📄
pattern.php
File
1788
Delete
Rename
Edit
Download
📁
post-author
Folder
-
Delete
Rename
📁
post-author-biography
Folder
-
Delete
Rename
📄
post-author-biography.php
File
1524
Delete
Rename
Edit
Download
📁
post-author-name
Folder
-
Delete
Rename
📄
post-author-name.php
File
1951
Delete
Rename
Edit
Download
📄
post-author.php
File
2734
Delete
Rename
Edit
Download
📁
post-comments-form
Folder
-
Delete
Rename
📄
post-comments-form.php
File
2805
Delete
Rename
Edit
Download
📁
post-content
Folder
-
Delete
Rename
📄
post-content.php
File
2156
Delete
Rename
Edit
Download
📁
post-date
Folder
-
Delete
Rename
📄
post-date.php
File
3124
Delete
Rename
Edit
Download
📁
post-excerpt
Folder
-
Delete
Rename
📄
post-excerpt.php
File
3447
Delete
Rename
Edit
Download
📁
post-featured-image
Folder
-
Delete
Rename
📄
post-featured-image.php
File
9363
Delete
Rename
Edit
Download
📁
post-navigation-link
Folder
-
Delete
Rename
📄
post-navigation-link.php
File
4837
Delete
Rename
Edit
Download
📁
post-template
Folder
-
Delete
Rename
📄
post-template.php
File
5749
Delete
Rename
Edit
Download
📁
post-terms
Folder
-
Delete
Rename
📄
post-terms.php
File
3640
Delete
Rename
Edit
Download
📁
post-title
Folder
-
Delete
Rename
📄
post-title.php
File
2138
Delete
Rename
Edit
Download
📁
preformatted
Folder
-
Delete
Rename
📁
pullquote
Folder
-
Delete
Rename
📁
query
Folder
-
Delete
Rename
📁
query-no-results
Folder
-
Delete
Rename
📄
query-no-results.php
File
1847
Delete
Rename
Edit
Download
📁
query-pagination
Folder
-
Delete
Rename
📁
query-pagination-next
Folder
-
Delete
Rename
📄
query-pagination-next.php
File
3787
Delete
Rename
Edit
Download
📁
query-pagination-numbers
Folder
-
Delete
Rename
📄
query-pagination-numbers.php
File
4770
Delete
Rename
Edit
Download
📁
query-pagination-previous
Folder
-
Delete
Rename
📄
query-pagination-previous.php
File
3584
Delete
Rename
Edit
Download
📄
query-pagination.php
File
1176
Delete
Rename
Edit
Download
📁
query-title
Folder
-
Delete
Rename
📄
query-title.php
File
2098
Delete
Rename
Edit
Download
📁
query-total
Folder
-
Delete
Rename
📄
query-total.php
File
2535
Delete
Rename
Edit
Download
📄
query.php
File
5690
Delete
Rename
Edit
Download
📁
quote
Folder
-
Delete
Rename
📁
read-more
Folder
-
Delete
Rename
📄
read-more.php
File
1830
Delete
Rename
Edit
Download
📄
require-dynamic-blocks.php
File
4163
Delete
Rename
Edit
Download
📄
require-static-blocks.php
File
501
Delete
Rename
Edit
Download
📁
rss
Folder
-
Delete
Rename
📄
rss.php
File
4073
Delete
Rename
Edit
Download
📁
search
Folder
-
Delete
Rename
📄
search.php
File
23016
Delete
Rename
Edit
Download
📁
separator
Folder
-
Delete
Rename
📁
shortcode
Folder
-
Delete
Rename
📄
shortcode.php
File
735
Delete
Rename
Edit
Download
📁
site-logo
Folder
-
Delete
Rename
📄
site-logo.php
File
6334
Delete
Rename
Edit
Download
📁
site-tagline
Folder
-
Delete
Rename
📄
site-tagline.php
File
1203
Delete
Rename
Edit
Download
📁
site-title
Folder
-
Delete
Rename
📄
site-title.php
File
1853
Delete
Rename
Edit
Download
📁
social-link
Folder
-
Delete
Rename
📄
social-link.php
File
65174
Delete
Rename
Edit
Download
📁
social-links
Folder
-
Delete
Rename
📁
spacer
Folder
-
Delete
Rename
📁
table
Folder
-
Delete
Rename
📁
tag-cloud
Folder
-
Delete
Rename
📄
tag-cloud.php
File
1590
Delete
Rename
Edit
Download
📁
template-part
Folder
-
Delete
Rename
📄
template-part.php
File
10154
Delete
Rename
Edit
Download
📁
term-description
Folder
-
Delete
Rename
📄
term-description.php
File
1336
Delete
Rename
Edit
Download
📁
text-columns
Folder
-
Delete
Rename
📁
verse
Folder
-
Delete
Rename
📁
video
Folder
-
Delete
Rename
📁
widget-group
Folder
-
Delete
Rename
📄
widget-group.php
File
2438
Delete
Rename
Edit
Download
Upload
Create Folder
📝 Editing:
query-pagination-numbers.php
Size: 4,770 bytes
Lines: 134
Type: .php
💾 Save
Cancel
✕
<?php /** * Server-side rendering of the `core/query-pagination-numbers` block. * * @package WordPress */ /** * Renders the `core/query-pagination-numbers` block on the server. * * @since 5.8.0 * * @global WP_Query $wp_query WordPress Query object. * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * * @return string Returns the pagination numbers for the Query. */ function render_block_core_query_pagination_numbers( $attributes, $content, $block ) { $page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page'; $enhanced_pagination = isset( $block->context['enhancedPagination'] ) && $block->context['enhancedPagination']; $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; $max_page = isset( $block->context['query']['pages'] ) ? (int) $block->context['query']['pages'] : 0; $wrapper_attributes = get_block_wrapper_attributes(); $content = ''; global $wp_query; $mid_size = isset( $block->attributes['midSize'] ) ? (int) $block->attributes['midSize'] : null; if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) { // Take into account if we have set a bigger `max page` // than what the query has. $total = ! $max_page || $max_page > $wp_query->max_num_pages ? $wp_query->max_num_pages : $max_page; $paginate_args = array( 'prev_next' => false, 'total' => $total, ); if ( null !== $mid_size ) { $paginate_args['mid_size'] = $mid_size; } $content = paginate_links( $paginate_args ); } else { $block_query = new WP_Query( build_query_vars_from_query_block( $block, $page ) ); // `paginate_links` works with the global $wp_query, so we have to // temporarily switch it with our custom query. $prev_wp_query = $wp_query; $wp_query = $block_query; $total = ! $max_page || $max_page > $wp_query->max_num_pages ? $wp_query->max_num_pages : $max_page; $paginate_args = array( 'base' => '%_%', 'format' => "?$page_key=%#%", 'current' => max( 1, $page ), 'total' => $total, 'prev_next' => false, ); if ( null !== $mid_size ) { $paginate_args['mid_size'] = $mid_size; } if ( 1 !== $page ) { /** * `paginate_links` doesn't use the provided `format` when the page is `1`. * This is great for the main query as it removes the extra query params * making the URL shorter, but in the case of multiple custom queries is * problematic. It results in returning an empty link which ends up with * a link to the current page. * * A way to address this is to add a `fake` query arg with no value that * is the same for all custom queries. This way the link is not empty and * preserves all the other existent query args. * * @see https://developer.wordpress.org/reference/functions/paginate_links/ * * The proper fix of this should be in core. Track Ticket: * @see https://core.trac.wordpress.org/ticket/53868 * * TODO: After two WP versions (starting from the WP version the core patch landed), * we should remove this and call `paginate_links` with the proper new arg. */ $paginate_args['add_args'] = array( 'cst' => '' ); } // We still need to preserve `paged` query param if exists, as is used // for Queries that inherit from global context. $paged = empty( $_GET['paged'] ) ? null : (int) $_GET['paged']; if ( $paged ) { $paginate_args['add_args'] = array( 'paged' => $paged ); } $content = paginate_links( $paginate_args ); wp_reset_postdata(); // Restore original Post Data. $wp_query = $prev_wp_query; } if ( empty( $content ) ) { return ''; } if ( $enhanced_pagination ) { $p = new WP_HTML_Tag_Processor( $content ); $tag_index = 0; while ( $p->next_tag( array( 'class_name' => 'page-numbers' ) ) ) { if ( null === $p->get_attribute( 'data-wp-key' ) ) { $p->set_attribute( 'data-wp-key', 'index-' . $tag_index++ ); } if ( 'A' === $p->get_tag() ) { $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' ); } } $content = $p->get_updated_html(); } return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, $content ); } /** * Registers the `core/query-pagination-numbers` block on the server. * * @since 5.8.0 */ function register_block_core_query_pagination_numbers() { register_block_type_from_metadata( __DIR__ . '/query-pagination-numbers', array( 'render_callback' => 'render_block_core_query_pagination_numbers', ) ); } add_action( 'init', 'register_block_core_query_pagination_numbers' );
✅ File saved successfully!